#! /usr/bin/env python
#coding=utf-8
if input()[::-1] == input():
    print("YES");
else:
    print("NO");
